//
//  DiscoverPhotoCollectionViewCell.m
//  RoadVehicles
//
//  Created by ENERGY on 2018/3/7.
//  Copyright © 2018年 appleLJ. All rights reserved.
//

#import "DiscoverPhotoCollectionViewCell.h"

@interface DiscoverPhotoCollectionViewCell()

@end

@implementation DiscoverPhotoCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.contentView.backgroundColor = [UIColor whiteColor];
        __weak typeof(self)weakSelf = self;
        [self.contentView addSubview:self.photoImg];
        [self.photoImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.bottom.top.equalTo(weakSelf.contentView);
        }];
    }return self;
}

- (UIImageView *)photoImg{
    if (!_photoImg) {
        _photoImg = [[UIImageView alloc] init];
    }return _photoImg;
}

//-(void)setModel:(NSDictionary *)model
//{
//    _model = model;
//    [_photoImg sd_setImageWithURL:[NSURL URLWithString: model]];
//
//}

-(void)setModel:(NSString *)model
{
    _model = model;
    [_photoImg sd_setImageWithURL:[NSURL URLWithString: model]];

}

@end
